<?php
include("include/cfg_login.php");

?>

<html>
	<head>
		<link href="css/style.css" rel="stylesheet">
		<link href="../css/start/jquery-ui-1.10.4.custom.css" rel="stylesheet">
	</head>
	<body>
		<div id="adminMenu">
			<?php include("include/menu.php"); ?>
		</div>
		<div id="content">
			<div id="contentWrap">
					<h1>Lista evenimente </h1>
					<table>
						<tr class="headTable" >
							<td>Eveniment</td>
							<td>Data</td>
						</tr>
						<?php
							$res = mysql_query("select * from evenimente order by data_eveniment desc limit 10");
							while($row = mysql_fetch_array($res)):
						?>
						<tr class="rowTable" href="/admin/eveniment.php?id=<? echo $row['id_cutremur']; ?>">
							<td>Cutremur de 5.5 grade in Zona seismica Vrancea,Vrancea la</td>
							<td> 06.10.2013, 01:37:21 (UTC)</td>
						</tr>
						<? endwhile; ?>
				</table>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> 
	<script src="../js/jquery-1.10.2.js"></script>
	<script src="../js/jquery-ui-1.10.4.custom.js"></script>
	<script>
		$(document).ready(function(){
			$('table tr').click(function(){
				window.location = $(this).attr('href');
				return false;
			});
		});
	</script>
</html>